<template>
  <div>
    <h2>TsCart</h2>
    <p>
      orderCount:{{ orderCount }}
      <hr>
      title:{{ title }}

      <hr>
      allow:{{ allow }}
      <hr>
      format:{{ format }}
      <hr>
      <!-- count{{ count }} -->
    </p>
  </div>
</template>
<script>
export default {
  // props: ['orderCount', 'count']
  props: {
    orderCount: {
      type: Number,
      // default: 200,
      default: () => {
        return 300;
      },
    },
    // title:String,
    title: {
      type: String,
      required: true,
    },
    allow: [Boolean, String],
    format: Function,
    cb: Promise,
    ctime: Date,
    hobbys: Array,
    info: Object,
    phone: {
      type: String,
      required: true,
      validator: (value) => {
        return /^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(value);
      }
    },
    age: {
      validator: (value) => {
        return value > 18 && value < 100;
      }
    }
  }
}
</script>
<style></style>